#ifndef __TF2J_H__
#define __TF2J_H__

#include <Math/ParamFunctor.h>
#include <TF2.h>

class TF2J : public TF2 {
    double ***fIntegral_cache;
    double *fIntegral;
    double qs;
    int qs_j, type_j;
    int mod_fact, lower;
    double micro_bin_edge;
    double binsize;
    double qs_2;
  public:
   TF2J(const char *name, Double_t (*fcn)(Double_t *, Double_t *), Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax, Int_t npar);
   TF2J(const char *name, ROOT::Math::ParamFunctor, Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax, Int_t npar);
//   TF2J(const char* name, ROOT::Math::ParamFunctor f,              Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax, Int_t npar){ }
    ~TF2J();
    void GetRandom2(Double_t&,Double_t&);
};

#endif
